package com.huatai.bpmn.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huatai.bpmn.entity.BasicDataEntity;
import com.huatai.bpmn.entity.vo.UserTaskVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 审核通过之后存储的正式数据 Mapper 接口
 * </p>
 *
 * @author yxy
 * @since 2023-07-27
 */
@Mapper
public interface BasicDataMapper extends BaseMapper<BasicDataEntity> {


	@Select("select bd.creator,bd.status,temp.NAME_ as name,bd.process_id as processId,bd.add_upd as addUpd from pmp_basic_data bd  LEFT JOIN " +
		"(select a.NAME_,b.my_key from  act_re_deployment a LEFT JOIN tb_deploy_form_mapping b on a.ID_=b.deploymentId ) " +
		"temp on bd.my_key=temp.my_key where creator=#{userId}")
	List<UserTaskVo> listByUserId(Long userId);
}
